@echo off
echo Building the project...
call npm run build

echo Deploying the application...
:: 假设你的私钥文件路径为C:\Users\YourUsername\.ssh\id_rsa，如果在其他位置，请相应更改。
:: 删除远程服务器上的旧文件
ssh -p 2002 -i ~\.ssh\id_rsa root@ssh.xunxinsoft.com "rm -rf /data/h5/health-cms"

:: 传输新的应用文件到服务器
scp -P 2002 -i ~\.ssh\id_rsa -r ./dist root@ssh.xunxinsoft.com:/data/h5/health-cms

echo Deployment completed successfully.
